Emacs should work with gcc 5.2 and newer
authorWolfgang Jenkner <wjenkner@inode.at>
Sat, 26 Dec 2015 20:12:02 +0000 (12:12 -0800)
committerRob Browning <rlb@defaultvalue.org>
Mon, 5 Sep 2016 19:33:14 +0000 (14:33 -0500)
commitf07b5081dc17404b73acfc9da576d9746d276b7a
tree6d3c76b097f9965eb23be5fd6d76e07a431d69f7
parentd4a257411a7c23c2ed75c3e163243fd0e92dc2be
Emacs should work with gcc 5.2 and newer

This patch, backported from upstream by Aurelien Jarno
<aurel32@debian.org>, has been added:

  Always define gmalloc etc. in src/gmalloc.c

  This is a work-around to prevent the compiler from using semantic
  knowledge about malloc for optimization purposes.  E.g., gcc 5.2
  with -O2 replaces most of calloc's definition by a call to calloc;
  see Bug#22085.
  * src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc)
  (aligned_alloc, free): Do not undef.  Instead, define these as
  functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc.

Origin: backport, commit: 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6
Bug-Debian: http://bugs.debian.org/833727
Added-by: Rob Browning <rlb@defaultvalue.org>
src/gmalloc.c